"""

    单独配置文件

"""

CONCURRENCY = 8

PROJECT_NAME = 'baidu_spider'

LOG_LEVEL = 'DEBUG'

DOWNLOAD_DELAY = 0

# RANDOMNESS = True

MIDDLEWARES = [
    "bald_spider.middleware.download_delay.DownloadDelay",
    "bald_spider.middleware.default_header.DefaultHeader",
    "bald_spider.middleware.retry.Retry",
    "bald_spider.middleware.response_code.ResponseCodeStats",
    "bald_spider.middleware.request_ignore.RequestIgnore"
    # "tests.baidu_spider.middleware.BaiduSpiderMiddleware"
]

PIPELINES = [
    #"bald_spider.pipeline.debug_pipeline.DebugPipeline",
    #"bald_spider.pipeline.mongodb_pipeline.MongodbPipeline",
    #"tests.baidu_spider.pipeline.TestPipeline",
]

EXTENSIONS = [
    "bald_spider.extension.log_interval.LogInterval",
    "bald_spider.extension.log_stats.LogStats"
]

USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

DEFAULT_HEADER = {
    "Accept": "application/json, text/javascript, */*; q=0.01"
}

DB_NAME = "bald_spider"

#ALLOWED_CODES = [404]

#FILTER_CLS = "bald_spider.duplicate_filter.redis_filter.RedisFilter"
#FILTER_CLS = "bald_spider.duplicate_filter.aioredis_filter.AioRedisFilter"
FILTER_CLS = "bald_spider.duplicate_filter.memory_filter.MemoryFilter"